package org.codeart.map.controller;

import org.codeart.common.util.R;
import org.codeart.map.service.DicDistrictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DistrictController {

    @Autowired
    private DicDistrictService dicDistrictService;

    @GetMapping("/dic-district")
    public R<Void> initDicDistrict(@RequestParam("keywords") String keywords) {
        boolean b = dicDistrictService.initDicDistrict(keywords);
        if (b) {
            return R.ok();
        }
        return R.fail();
    }


}
